package com.oyesgo.statistics.utils;

/**
 * @FileName StringUtils.java
 * @Description: 统计字符串处理工具
 * @author rose
 * @version 1.0
 * <p>Company: OYESGO</p>
 * <p>Copyright: Copyright (c) 2010</p>
 */
public class StringUtils {
	

	/**
	 * 传入字符串 按照某个 字符 截取字符串 返回String数组
	 * @param str 需要处理的字符串
	 * @param tag 按照tag截取
	 * @return 
	 * String[] 
	 * @author rose
	 */
	public static String[] splitByTag(String str,String tag){
		String[] result = null;
		if (str == null || "".equals(str) || tag == null || "".equals(tag)) {
			return result;
		}else {
			str = str.trim();
		}
		
		try {
			result = str.split(tag+"+");
		} catch (Exception e) {
			result = null;
			System.out.println("exception:截取出现异常");
		}
		return result;
	}
	public static void main(String[] args) {
		
	}
		
	
}
